package com.qiaofang.applet.service.property.repository;

import com.qiaofang.applet.service.property.domain.Property;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * @author QF2019
 */
@Repository
public interface PropertyRepository extends MongoRepository<Property, String> {
    Property findByPropertyUuidAndCompanyUuid(String propertyUuid, String companyUuid);

    Property findFirstByPropertyUniqueUuid(String propertyUniqueUuid);

    Property findByCorporationCodeAndPropertyUniqueUuid(String corporationCode, String uniqueUuid);

    List<Property> findAllByCorporationCodeAndTradeStatusAndPropertyUuidIn(String corporationCode, String tradeStatus, List<String> uuids);

    List<Property> findAllByCorporationCodeAndPropertyUniqueUuidIn(String corporationCode,List<String> propertyUniqueUuidList);
}
